package website.haicheng.core.config.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @description: 雪花算法配置文件
 * @author: 582895699@qq.com
 * @time: 2021/3/4 下午 09:37
 */
@Component
@ConfigurationProperties(prefix = "snowflake")
public class SnowflakeProperties {
    /**
     * 终端Id
     */
    private long workerId;
    /**
     * 数据中心Id
     */
    private long dataCenterId;

    public long getWorkerId() {
        return workerId;
    }

    public void setWorkerId(long workerId) {
        this.workerId = workerId;
    }

    public long getDataCenterId() {
        return dataCenterId;
    }

    public void setDataCenterId(long dataCenterId) {
        this.dataCenterId = dataCenterId;
    }
}
